package com.yhsimon.factory.absfactory.pizzastore.order;

import com.yhsimon.factory.absfactory.pizzastore.pizza.LDCheesePizza;
import com.yhsimon.factory.absfactory.pizzastore.pizza.LDPepperPizza;
import com.yhsimon.factory.absfactory.pizzastore.pizza.Pizza;

public class LDFactory implements AbsFactory{


    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza=null;
        if(orderType.equals("cheese")){
            pizza=new LDCheesePizza();
            pizza.setName("伦敦奶酪披萨");
        }else if(orderType.equals("pepper")){
            pizza=new LDPepperPizza();
            pizza.setName("伦敦胡椒披萨");
        }
        return pizza;
    }
}
